package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	ComSnEventNew          = "tool.ComSnNew"
	ComSnEventBeforeCreate = "tool.ComSnBeforeCreate"
	ComSnEventBeforeUpdate = "tool.ComSnBeforeUpdate"
	ComSnEventBeforeSave   = "tool.ComSnBeforeCreate tool.ComSnBeforeUpdate"
	ComSnEventAfterCreate  = "tool.ComSnAfterCreate"
	ComSnEventAfterUpdate  = "tool.ComSnAfterUpdate"
	ComSnEventAfterSave    = "tool.ComSnAfterCreate tool.ComSnAfterUpdate"
	ComSnEventDelete       = "tool.ComSnDelete"
)

func GetComSnConfig() *mgo.DocConfig {
	return ComSn_Config
}

var ComSn_Config *mgo.DocConfig

func init() {
	ComSn_Config = NewComSnConfig()
}
func NewComSnConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "tool.ComSn",
		Fields: []string{
			"name", "text", "service",
		},
		RelationFields:  []string{},
		RelationConfigs: map[string]*mgo.DocRelation{},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
